/*
 * @Author: WangShuai 1830773767@qq.com
 * @Date: 2025-06-02 07:12:07
 * @LastEditors: WangShuai 1830773767@qq.com
 * @LastEditTime: 2025-06-16 20:02:38
 * @FilePath: \threejs_base\src\mesh\CircleMesh.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

//引入three
import * as THREE from 'three'
//创建一个圆形面几何
const geom = new THREE.CircleGeometry(5, 150) //半径 圆的边
// const material = new THREE.MeshBasicMaterial({
//     color:new THREE.Color(0xffffff),
//     side: THREE.DoubleSide, //设置为双面渲染,/默认单面渲染,
//     transparent: true,
// })
const material = new THREE.MeshStandardMaterial({
  color: new THREE.Color(0xffffff),
  side: THREE.DoubleSide, //设置为双面渲染,/默认单面渲染,
  transparent: true,
})
const circle = new THREE.Mesh(geom, material)
//注意 默认正面垂直于z轴,平行于y轴, 是立着的,所以要反转-90度
circle.rotation.x -= (90 * Math.PI) / 180
circle.receiveShadow = true //开启接收阴影
circle.position.set(0, -0.03, 0)
export default circle
